/*
 * @Author: 高瑞寒 15932717091@163.com
 * @Date: 2022-05-07 15:18:34
 * @LastEditTime: 2022-05-07 23:32:01
 * @LastEditors: 高瑞寒 15932717091@163.com
 * @Description: 
 */
/*
 * @Author: 高瑞寒 15932717091@163.com
 * @Date: 2022-05-07 15:18:34
 * @LastEditTime: 2022-05-07 16:33:15
 * @LastEditors: 高瑞寒 15932717091@163.com
 * @Description: 
 */
import React from 'react'
import { NavLink, useRoutes } from 'react-router-dom'
import Header from './components/Header'
import routes from './routes'
export default function App() {
  const elements = useRoutes(routes)
  return (
    <div>
  <Header></Header>
      <div className="row">
        <div className="col-xs-2 col-xs-offset-2">
          <div className="list-group">
            <NavLink className={({isActive}) => isActive ? 'list-group-item active' : 'list-group-item'} to='/home'>Home</NavLink>
            <NavLink className={({isActive}) => isActive ? 'list-group-item active' : 'list-group-item'} to='/about'>About</NavLink>
          </div>
        </div>
        <div className="col-xs-6">
          <div className="panel">
            <div className="panel-body">
              {elements}
            </div>
          </div>
        </div>
      </div>
    </div>
  )
}
